package com.yueqian.service.impl;

import com.yueqian.dao.IPermissionsDao;
import com.yueqian.domain.Permission;
import com.yueqian.service.IPermissionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PermissionsServiceImpl implements IPermissionsService {
    @Autowired
    private IPermissionsDao permissionsDao;

    @Override
    public List<Permission> findAll() throws Exception {
        List<Permission> permissionList = permissionsDao.findAll();
        return permissionList;
    }

    @Override
    public void save(Permission permission) throws Exception {
        permissionsDao.save(permission);
    }
}
